home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / DELPHI32 / LABELS / FILELBL / EXAMPLE.ZIP / Unit1.pas < prev   
Encoding:
Pascal/Delphi Source File  |  1996-08-07  |  1.0 KB  |  51 lines

  1. unit Unit1;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  7.   StdCtrls, FileLbl, ExtCtrls, FileCtrl;
  8.  
  9. type
  10.   TForm1 = class(TForm)
  11.     FileLabel1: TFileLabel;
  12.     FileListBox1: TFileListBox;
  13.     DirectoryListBox1: TDirectoryListBox;
  14.     DriveComboBox1: TDriveComboBox;
  15.     Button1: TButton;
  16.     procedure FileListBox1Change(Sender: TObject);
  17.     procedure Button1Click(Sender: TObject);
  18.   private
  19.     { DΘclarations privΘes }
  20.   public
  21.     { DΘclarations publiques }
  22.   end;
  23.  
  24. var
  25.   Form1: TForm1;
  26.  
  27. implementation
  28.  
  29. {$R *.DFM}
  30.  
  31. procedure TForm1.FileListBox1Change(Sender: TObject);
  32. begin
  33.   FileLabel1.FileName := FileListBox1.FileName;
  34. end;
  35.  
  36. procedure TForm1.Button1Click(Sender: TObject);
  37. begin
  38.   case FileLabel1.Direction of
  39.     drFromLeft: begin
  40.       Button1.Caption := 'From left';
  41.       FileLabel1.Direction := drFromRight;
  42.     end;
  43.     drFromRight: begin
  44.       Button1.Caption := 'From right';
  45.       FileLabel1.Direction := drFromLeft;
  46.     end;
  47.   end;
  48. end;
  49.  
  50. end.
  51.